<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta name="referrer" content="no-referrer" />
    <meta
      name="description"
      content="汇融名企是面向全国商家服务的大型互联网平台，为商家提供流量扶持，引导品牌曝光；为消费者提供风云榜单，招商加盟，引导实现消费，达成合作，上汇融名企实现共赢。"
    />
    <title>汇融名企</title>
    <link rel="stylesheet" href="./css/common.css" />
    <link rel="stylesheet" href="./css/index.css" />
    <link rel="stylesheet" href="./css/carousel.css" />
    <link rel="stylesheet" href="./css/ranking.css" />
    <link rel="stylesheet" href="./css/sentimentLeft.css" />
    <link rel="stylesheet" href="./css/sentimentRight.css" />
    <link rel="stylesheet" href="./css/sentimentBanner.css" />
  </head>
  <body>
    <!--顶部广告图-->
    <div class="header-top-banner">
      <a href="appraise-choice.html"></a><i></i>
    </div>
    <!-- <div id="header-page"></div> -->
    <!--#include virtual="/header.html" -->
    <!--火热招商-悬浮-->
    <div class="brand-star">
      <div class="brand-star-left">
        <img
          class="brand-left-close"
          id="brand-left-close"
          src="./image/icon/index_anniu-yellow.png"
          alt="火热招商-汇融名企"
        />
        <a href="http://www.jsboth.com" rel="nofollow" target="_blank">
          <img
            class="brand-star-img"
            src="./image/picture/index_bg.png"
            alt="火热招商-汇融名企"
          />
        </a>
      </div>
      <div class="brand-star-right">
        <img
          class="brand-right-close"
          id="brand-right-close"
          src="./image/icon/index_anniu-yellow.png"
          alt="火热招商-汇融名企"
        />
        <a href="http://www.jsboth.com" rel="nofollow" target="_blank">
          <img
            class="brand-star-img-right"
            src="./image/picture/index_bg.png"
            alt="火热招商-汇融名企"
          />
        </a>
      </div>
    </div>
    <div class="banner-top-line"></div>
    <div class="content-wrapper">
      <div class="top-carousel">
        <div class="pb-carouselWarp carousel carousel-banner">
          <ul class="pb-carousel" id="banner-1"></ul>
          <ul class="pb-carousel-ind" id="banner-1-point"></ul>
        </div>
      </div>
      <!-- <div class="left-menu"></div> -->
      <div class="content">
        <div id="top-banner-wrapper"></div>
        <div id="mid-small-wrapper"></div>
        <!-- 名企榜 暂时注释掉 -->
        <!-- <div class="title" id="ranking-title">
          <div style="position: relative">
            <img src="./image/picture/index_title_billboard.png" alt="名企榜-汇融名企" />
            <div class="title-menu" id="title-menu"></div>
            <div class="title-more">
              <a href="./rankingPage.html"> MORE <span>></span></a>
            </div>
          </div>
          <div class="title-divider-wrapper">
            <div class="title-divider-colorbar"></div>
            <div class="title-divider"></div>
          </div>
        </div>
        <div id="ranking-wrapper" class="ranking-wrapper"></div> -->
        <div class="title" style="margin-top: 20px;">
          <div style="position: relative;">
            <img
              src="./image/picture/index_title_investment.png"
              alt="招商加盟-汇融名企"
            />
            <div class="title-more">
              <a href="./merchantsJoin.html"> MORE <span>></span></a>
            </div>
          </div>
          <div class="title-divider-wrapper">
            <div class="title-divider-colorbar"></div>
            <div class="title-divider"></div>
          </div>
        </div>
        <div class="investment">
          <div class="investment-img"></div>
          <div class="brand-wrapper" id="brand-wrapper"></div>
        </div>
        <div id="mid-banner-wrapper"></div>
        <div class="title" style="margin-top: 45px;">
          <div style="position: relative;">
            <img
              src="./image/picture/index_title_news.png"
              alt="最新要闻-汇融名企"
            />
            <div class="title-more">
              <a href="./newsCenter.html"> MORE <span>></span></a>
            </div>
          </div>
          <div class="title-divider-wrapper">
            <div class="title-divider-colorbar"></div>
            <div class="title-divider"></div>
          </div>
        </div>
        <div class="news-con" id="news-center">
          <div class="news-left">
            <ul class="news-ul-left" id="newsLeftfirst"></ul>
            <ul class="news-ul-left" id="newsLeftsecond"></ul>
          </div>
          <div class="news-content">
            <div class="news-title">热门图片</div>
            <ul class="news-ul-center" id="newsContent"></ul>
          </div>
          <div class="news-right">
            <div class="news-title">热门新闻</div>
            <ul class="news-ul-right" id="newsRight"></ul>
          </div>
        </div>
        <div class="title" style="margin-top: 45px;">
          <div style="position: relative;">
            <img
              src="./image/picture/index_title_popularity.png"
              alt="人气加盟-汇融名企"
            />
            <div class="title-more">
              <a href="./merchantsJoin.html"> MORE <span>></span></a>
            </div>
          </div>
          <div class="title-divider-wrapper">
            <div class="title-divider-colorbar"></div>
            <div class="title-divider"></div>
          </div>
        </div>
        <div class="sentiment wrapper">
          <div class="sentiment-left">
            <ul id="sentiment-left"></ul>
          </div>
          <div
            class="sentiment-right inline-block"
            style="position: absolute; top: 0; left: 784px;"
          >
            <table class="sentiment-table-th">
              <tr>
                <td width="90">联系人</td>
                <td width="120">代理地区</td>
                <td width="300">咨询内容</td>
                <td width="100"></td>
              </tr>
            </table>

            <div class="myscroll">
              <ul id="sentiment-right"></ul>
            </div>
          </div>
          <div class="sentiment-banner">
            <div class="sentiment-carousel">
              <div class="pb-carouselWarp carousel">
                <ul class="pb-carousel" id="banner-1"></ul>
                <ul class="pb-carousel-ind" id="banner-1-point"></ul>
              </div>
            </div>
          </div>
        </div>
        <div class="clear"></div>
        <!-- 项目招标暂时注释掉 -->
        <!-- <div class="project-bidding-bottom">
          <div class="title" style="margin:0 0 36px">
            <div style="position: relative">
              <img src="./image/picture/home_title.png" alt="项目招标-汇融名企" />
              <div class="title-more">
                <a href="./merchantsJoin.html"> MORE <span>></span></a>
              </div>
            </div>
            <div class="title-divider-wrapper">
              <div class="title-divider-colorbar"></div>
              <div class="title-divider"></div>
            </div>
          </div>
          <div class="tender-con">
            <div class="project-title">
              <div class="name"><i class="title-icon4"></i><span>招标公告</span></div>
              <a class="project-more">更多</a>
            </div>
            <ul class="project-ul con-ul" id="tenderAnnouncement"></ul>
          </div>
          <div class="tender-con">
            <div class="project-title">
              <div class="name"><i class="title-icon5"></i><span>招标预告</span></div>
              <a class="project-more">更多</a>
            </div>
            <ul class="project-ul con-ul" id="tenderNotice"></ul>
          </div>
          <div class="tender-con" style="margin-right: 0;">
            <div class="project-title">
              <div class="name"><i class="title-icon6"></i><span>中标公告</span></div>
              <a class="project-more">更多</a>
            </div>
            <ul class="project-ul con-ul" id="biddingNotice"></ul>
          </div>
        </div> -->
        <!-- <div class="project-bidding-bottom">
          <div class="bottom-con">
            <div class="title title1">合作单位</div>
            <div class="cooperation"></div>
          </div>
          <div class="bottom-con">
            <div class="title title2">招标公司</div>
            <div class="bidding-company"></div>
          </div>
          <div class="bottom-con" style="margin-right: 0;">
            <div class="title title3">供应求购</div>
            <div class="forsupply"></div>
          </div>
        </div> -->
        <div class="clear"></div>
      </div>
    </div>
    <!--#include virtual="/footer.html" -->
    <!-- <div id="footer-page"></div> -->

    <script src="./js/jquery-1.11.0.min.js"></script>
    <script src="./js/scroll.js"></script>
    <script src="./js/jquery.my-message.1.1.js"></script>
    <!-- <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> -->
    <script src="./js/utils.js"></script>
    <script src="./js/api.js"></script>
    <script src="./js/homeImages.js"></script>
    <!--排行榜-->
    <script src="./js/ranking.js"></script>
    <!--招商加盟-->
    <script src="./js/sentimentLeft.js"></script>
    <script src="./js/sentimentRight.js"></script>
    <!--最新要闻-->
    <script src="./js/newsCenter.js"></script>
    <script
      src="./js/carousel.min.js"
      type="text/javascript"
      charset="utf-8"
    ></script>
    <script type="text/javascript">
      $(function () {
        initBanner()
        if (!sessionStorage.getItem('city_name')) {
          setTimeout(function () {
            var params = {
              city_id: sessionStorage.getItem('city_id'),
            }
            var api = new ajax('GET', '/api/home/index', params)
            api.then(function (res) {
              init(JSON.parse(res).data)
            })
          }, 600)
        } else {
          var params = {
            city_id: sessionStorage.getItem('city_id'),
          }
          var api = new ajax('GET', '/api/home/index', params)
          api.then(function (res) {
            init(JSON.parse(res).data)
          })
        }
        // setTimeout(function() {
        //   $('.header-top-banner').slideUp('slow')
        // }, 20000)
        $('.header-top-banner i').click(function () {
          $('.header-top-banner').slideUp('slow')
        })
      })
      function initBanner() {
        onImgchange()
        window.onresize = function () {
          onImgchange()
        }
        initTopCarousel(homeBannerImg, $('.top-carousel'))
        initTopCarousel(carouselBanner, $('.sentiment-carousel'))
        initTopBanner(banner, $('#top-banner-wrapper'))
        initMidBanner(merchantsImgssecond, $('#mid-small-wrapper'))
        initMidBanner(midBanner, $('#mid-banner-wrapper'))
        // 项目招标-合作单位等
        // initCooperation(cooperationData, $('.cooperation'))
        // initBiddingCompany(biddingCompanyData, $('.bidding-company'))
        // initForsupply(forsupplyData, $('.forsupply'))
      }
      function onImgchange() {
        var windowWidth = $('body').width()
        var carouselBanner = $('.carousel-banner')
        var headerTopbanner = $('.header-top-banner a')
        carouselBanner.css('height', (558 / 1903) * windowWidth + 'px')
        headerTopbanner.css('height', (111 / 1903) * windowWidth + 'px')
      }
      function init(data) {
        // $('#header-page').load('header.html')
        // $('#footer-page').load('footer.html')
        initBrand(data.canvass, 4, $('#brand-wrapper'))
        initSentimentLeft(data.joinIn.popularity, 4, $('#sentiment-left'))
        initSentimentRight(data.joinIn.consultation, 0, $('#sentiment-right'))
        $('.myscroll').myScroll({
          speed: 40, //数值越大，速度越慢
          rowHeight: 38, //li的高度
        })
        // 排行榜（暂时注释掉）
        // initTitleMenu(data.type, $('#title-menu'))
        // if (data.ranking.length === 0) {
        //   $('#ranking-wrapper').hide()
        //   $('#ranking-title').hide()
        // } else if (data.ranking.length < 5) {
        //   $('#ranking-wrapper').css('height', 613)
        //   initRanking(data.ranking, 4, $('#ranking-wrapper'))
        // } else {
        //   initRanking(data.ranking, 4, $('#ranking-wrapper'))
        // }

        // 项目招标-招标公告等（暂时注释掉）
        // initCompanyDynamic(data.tenderNotice, $('#tenderAnnouncement'))
        // initCompanyDynamic(data.tenderYugao, $('#tenderNotice'))
        // initCompanyDynamic(data.winningAnnouncement, $('#biddingNotice'))

        // 最新要闻
        var newsContent = $('#newsContent')
        var newsRight = $('#newsRight')
        var newsLeftfirst = $('#newsLeftfirst')
        var newsLeftsecond = $('#newsLeftsecond')
        var latestNews = data.latestNews
        if (latestNews.length > 0) {
          initNewscontent(newsContent, latestNews.slice(0, 2))
          initNewsright(newsRight, latestNews.slice(2, 8))
          initNewsleft(newsLeftfirst, latestNews.slice(8, 14))
          initNewsleft(newsLeftsecond, latestNews.slice(14, 20))
        }
        onImgerror()
        $('.project-more').click(function () {
          sessionStorage.setItem(
            'projectType',
            $(this).parent().find('.name span').html()
          )
          go('tenderingList.html')
        })
      }
      // 新闻图片报错处理机制
      function onImgerror() {
        var URLImg = './image/picture/news_img0'
        var newsCenter = $('#news-center')
        newsCenter.find('.img-center1').error(function () {
          $(this).attr('src', URLImg + '16.png')
        })
        newsCenter.find(' .img-center2').error(function () {
          $(this).attr('src', URLImg + '17.png')
        })
        newsCenter.find(' .img-right').error(function () {
          $(this).attr('src', URLImg + '18.png')
        })
      }
      function initTopBanner(data, parent) {
        var el = ''
        for (key in data) {
          var currentData = data[key]
          var temp =
            '<a target="_blank" href="' +
            currentData.url +
            '" rel="nofollow" ><div class="top-banner" style="background: url(' +
            currentData.images +
            ')"></div></a>'
          el += temp
        }
        parent.append(el)
      }
      function initMidBanner(data, parent) {
        var el = ''
        for (key in data) {
          var currentData = data[key]
          var temp =
            '<a target="_blank" href="' +
            currentData.url +
            '" rel="nofollow"><div class="mid-banner" style="background: url(' +
            currentData.images +
            ');margin-right:' +
            ((+key + 1) % 4 == 0 ? '0px' : '7px') +
            '"></div></a>'
          el += temp
        }
        parent.append(el)
      }
      function initTitleMenu(type, parent) {
        var data = type
        data.unshift({ id: 0, ind_name: '最新榜单' })
        var el = ''
        for (key in data) {
          var currentData = data[key]
          var temp =
            '<span id="type-' +
            currentData.id +
            '" ' +
            (+key === 0
              ? 'class="title-menu-active">'
              : '><img src="./image/icon/title_divider.png" alt="最新榜单-汇融名企">') +
            currentData.ind_name +
            '</span>'
          el += temp
        }
        // parent.append(el)
        $('.title-menu span').click(function () {
          if (!$(this).hasClass('title-menu-active')) {
            $('.title-menu span').removeClass('title-menu-active')
            $(this).addClass('title-menu-active')
          }
          var id = $(this).attr('id').split('-')[1]
        })
      }
      function initBrand(data, num, parent) {
        var el = ''
        for (key in data) {
          var flag = (+key + 1) % num
          var currentData = data[key]
          var temp = [
            '<div class="brand" id="' +
              currentData.id +
              '" ' +
              (flag ? '' : 'style="margin-right:0"') +
              '>',
            '  <img class="brand-tag" src="./image/picture/brand_tag.png" alt="汇融名企" >',
            '  <div class="brand-img" id="canvass-' + currentData.id + '">',
            '    <img class="brand-img" src="' +
              (currentData.img[0].indexOf('http') > -1
                ? currentData.img[0]
                : imgURL + currentData.img[0]) +
              '" alt="' +
              currentData.title +
              '-汇融名企" />',
            '  </div>',
            '  <div class="brand-text need-text-overflow" id="canvass-' +
              currentData.id +
              '">',
            currentData.title,
            '  </div>',
            '</div>',
          ].join('')
          el += temp
        }
        parent.append(el)
        $('.brand').click(function (e) {
          go('JoininDetails.html?id=' + e.currentTarget.id)
        })
      }
      function initCooperation(data, parent) {
        var item = ''
        for (var i in data) {
          var currentData = data[i]
          item +=
            '<a target="_blank" href="' +
            currentData.url +
            '"><img class="tender-img" style="margin-right:' +
            (i != 0 && (+i + 1) % 2 == 0 ? '0' : '12px') +
            '" src="' +
            currentData.images +
            '" alt="汇融名企" /></a>'
        }
        parent.append(item)
      }
      function initBiddingCompany(data, parent) {
        var item = ''
        for (var i in data) {
          var currentData = data[i]
          item +=
            '              <a style="margin-right:' +
            (i != 0 && (+i + 1) % 3 == 0 ? '0' : '') +
            '">' +
            '              <img src="' +
            currentData.images +
            '" alt="汇融名企" />' +
            '            </a>'
        }
        parent.append(item)
      }
      function initForsupply(data, parent) {
        var item = ''
        for (var i in data) {
          var currentData = data[i]
          item +=
            '              <a style="margin-right:' +
            (i != 0 && (+i + 1) % 3 == 0 ? '0' : '') +
            '">' +
            '              <img src="' +
            currentData.images +
            '" alt="汇融名企" />' +
            '            </a>'
        }
        parent.append(item)
      }
      function initCompanyDynamic(data, parent) {
        var item = ''
        for (var i in data) {
          var currentData = data[i]
          item +=
            ' <li>' +
            '                <a href="tenderDetails.html?id=' +
            currentData.tend_id +
            '">' +
            '              <p class="need-text-overflow">' +
            currentData.entry_name +
            '              </p>' +
            '              <div class="right time">' +
            currentData.release_time +
            '</div>' +
            '</a>' +
            '            </li>'
        }
        parent.append(item)
      }
    </script>
  </body>
</html>
